package com.atguigu.yygh.hosp.mongo;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends MongoRepository<User,String> {

    // name=? and  age=?
    public List<User> findByNameAndAge(String name,Integer age);

    // name like ?
    public List<User> findByNameLike(String name);
}
